home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / gs261src.zip / sysvlp.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1992-10-08  |  906b  |  46 lines

  1. #!/bin/sh
  2.  
  3. # System V 3.2 lp interface for parallel, postscript printer
  4. # with ghostscript 2.5.n.
  5. #
  6. # Thanks to Arne Ludwig (arne@rrzbu.hanse.de) for this script.
  7. #
  8.  
  9. DEVICE=lbp8
  10. GSHOME=/local/gs/2.5b2
  11. FONT=/local
  12. LIBDIR=/usr/spool/lp/admins/lp/interfaces
  13. #EHANDLER=$LIBDIR/ehandler.ps
  14.  
  15. GS_LIB=$GSHOME:$FONT/fonts:$FONT/fonts/lw:$FONT/fonts/gs
  16. export GS_LIB
  17.  
  18. copies=$4
  19. shift 5
  20. files="$*"
  21.  
  22. # serial line settings
  23. # stty 19200 ixon ixoff 0<&1
  24. # stty 1200 tabs cread opost onlcr ixon ixany ff1 cr2 nl0 0<&1
  25.  
  26. # Brother HL-4: switch to HP laserjet II+ emulation
  27. # echo "\033\015H\c"
  28.  
  29. i=1
  30. while [ $i -le $copies ]
  31. do
  32.     for file in $files
  33.     do
  34.         $GSHOME/gs \
  35.             -sOUTPUTFILE=/tmp/psp$$.%02d \
  36.             -sDEVICE=$DEVICE \
  37.             $EHANDLER $file \
  38.             < /dev/null >> /usr/tmp/ps_log 2>&1
  39.  
  40.         cat /tmp/psp$$.* 2>> /usr/tmp/ps_log
  41.         rm -f /tmp/psp$$.*
  42.     done
  43.     i=`expr $i + 1`
  44. done
  45. exit 0
  46.